package com.songlanyun.common.enums;

import java.util.HashMap;
import java.util.Map;

public enum KqPayTypeEnum {
    /**
     * 快钱-惠选系统内部业务逻辑--支付类型
     */

    UNBIND("0", "未绑定银行卡首次绑定"),//启用
    BIND("1", "绑定银行卡");//未启用

    private final String code;
    private final String desc;

    public String getCode() {
        return code;
    }

    public int getIntCode() {
        return Integer.parseInt(code);
    }

    public String getDesc() {
        return desc;
    }

    private static final Map lookup = new HashMap();

    static {
        for (KqPayTypeEnum e : KqPayTypeEnum.values()) {
            lookup.put(e.code, e);
        }
    }

    public static KqPayTypeEnum find(String code, KqPayTypeEnum defaultValue) {
        KqPayTypeEnum value = (KqPayTypeEnum) lookup.get(code);
        if (value == null) {
            return defaultValue;
        }
        return value;
    }


    KqPayTypeEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }
}
